Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce metadata IO during segment allocation #17496

Merged
merged 5 commits into from
Nov 26, 2024

Conversation

kfaraz
Copy link
Contributor

@kfaraz kfaraz commented Nov 21, 2024

Revives #17420

Description

The changes here try to reduce metadata IO during segment allocation by fetching segment payloads
for only the required segments. For other segments, only fetching the segment ID suffices.

Changes

  • Add Overlord runtime property druid.indexer.tasklock.batchAllocationReduceMetadataIO.
  • Setting this flag to true (default value) allows the Overlord to fetch only necessary segment payloads during segment allocation
  • Settings this flag to false restores original segment allocation behaviour

Release note

Add Overlord runtime property druid.indexer.tasklock.batchAllocationReduceMetadataIO.
Setting this flag to true (default value) allows the Overlord to fetch only necessary segment payloads during segment allocation.


This PR has:

  • been self-reviewed.
  • added documentation for new or modified features or behaviors.
  • a release note entry in the PR description.
  • added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
  • added or updated version, license, or notice information in licenses.yaml
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage is met.
  • added integration tests.
  • been tested in a test Druid cluster.

@@ -36,6 +36,9 @@ public class TaskLockConfig
@JsonProperty
private long batchAllocationWaitTime = 0L;

@JsonProperty
private boolean batchAllocationReduceMetadataIO = false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be always on and then we remove this config in next release ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I guess the changes are safe enough. We can always keep it on. Let me try to run ITs with it turned on.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flag has been set to true by default.

@kfaraz
Copy link
Contributor Author

kfaraz commented Nov 26, 2024

Thanks for the reviews, @AmatyaAvadhanula , @cryptoe !
Taking a final look at the PR, then I will merge the changes.

@kfaraz kfaraz merged commit 207ad16 into apache:master Nov 26, 2024
82 checks passed
@kfaraz kfaraz deleted the reduce_segalloc_metadata_io branch November 26, 2024 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants